<#include "../common/header.html">

<body class="skin-blue fixed sidebar-mini" style="height: auto; min-height: 100%;">
<div class="wrapper" style="height: auto; min-height: 100%;">
    <#assign page_tab="index">
    <#assign page_nav="basic">
    <#include "../common/system_menu.html">

    <!--右侧内容 开始-->
    <div id="admin_right" class="content-wrapper">
        <div class="breadcrumbs" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="home-icon fa fa-home"></i>
                    <a href="/system/user/user_list">会员</a>
                </li>
                <li>
                    <a href="/system/user/user_list">会员管理</a>
                </li>
                <li class="active">编辑会员</li>
            </ul>
        </div>
        <div class="content">
            <form action="/system/user/user_update" method="post" name="memberForm" id="update">
                <input name="userId" value="${user.userId!}" type="hidden" />
                <table class="table form-table">
                    <colgroup>
                        <col width="130px" />
                        <col />
                    </colgroup>
                    <tbody>
                    <tr>
                        <th>登录名：</th>
                        <td><input class="form-control" name="userName" type="text" value="${user.userName!}" placeholder="用户名不能为空" /></td>
                    </tr>
                    <tr>
                        <th>用户昵称：</th>
                        <td><input class="form-control" name="nickName" type="text" value="${user.nickName!}" placeholder="用户昵称不能为空" /></td>
                    </tr>
                    <tr>
                        <th>邮箱：</th>
                        <td><input type="text" class="form-control" name="userEmail" value="${user.userEmail!}" pattern="email" empty /></td>
                    </tr>
                    <tr>
                        <th>密码：</th><td><input class="form-control" name="password" value="" type="password" /></td>
                    </tr>
                    <tr>
                        <th>会员组：</th>
                        <td>
                            <select class="form-control" name="groupId">
                                <option value=''>请选择</option>
                                <@fly_usergrouplist>
                                <#list grouplist as list>
                                <@fly_usergroup userId="${user.userId!}">
                                <option value='${list.id!}'<#if group??><#if list.id=group.id> selected = "selected"</#if></#if>>${list.groupName!}</option>
                                </@fly_usergroup>
                                </#list>
                                </@fly_usergrouplist>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>姓名：</th>
                        <td><input class="form-control" name="trueName" type="text" value="${user.trueName!}" placeholder="真实的姓名" /></td>
                    </tr>
                    <tr>
                        <th>性别：</th>
                        <td>
                            <label class="radio-inline">
                                <input type="radio" name="sex" value="1"<#if user.sex==1> checked="checked"</#if>>男
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="sex" value="2"<#if user.sex==2> checked="checked"</#if>>女
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <th>电话：</th><td><input class="form-control" name="telephone" type="text" value="${user.telephone!}" empty pattern="phone" placeholder="固定座机号码如010-66668888-123" /><p class="help-block">格式：（地区号-）用户号（-分机号）如010-66668888-123</p></td>
                    </tr>
                    <tr>
                        <th>手机：</th><td><input class="form-control" name="mobile" type="text" value="${user.userMobile!}" empty pattern="mobi" placeholder="手机号码" /></td>
                    </tr>
                    <tr>
                        <th>地区：</th>
                        <td>
                            <div class="row">
                                <div class="col-xs-3">
                                    <select name="province" id="province" class="form-control">
                                        <option value="0">请选择省份</option>
                                        <@fly_areaslist parentId=0>
                                        <#list areaslist as list>
                                        <option value="${list.areaId?c}"<#if user.province??><#if list.areaId == user.province> selected = "selected"</#if></#if>>${list.areaName!}</option>
                                        </#list>
                                        </@fly_areaslist>
                                    </select>
                                </div>
                                <div class="col-xs-3">
                                    <select name="city" id="city" class="form-control">
                                        <option value="0">请选择地区</option>
                                        <#if user.city??>
                                        <@fly_areaslist parentId=user.province>
                                        <#list areaslist as list>
                                        <option value="${list.areaId?c}"<#if list.areaId==user.city> selected = "selected"</#if>>${list.areaName!}</option>
                                        </#list>
                                        </@fly_areaslist>
                                        </#if>
                                    </select>
                                </div>
                                <div class="col-xs-3">
                                    <select name="area" id="area" class="form-control">
                                        <option value="0">请选择县市</option>
                                        <#if user.area??>
                                        <@fly_areaslist parentId=user.city>
                                        <#list areaslist as list>
                                        <option value="${list.areaId?c}"<#if list.areaId==user.area> selected = "selected"</#if>>${list.areaName!}</option>
                                        </#list>
                                        </@fly_areaslist>
                                        </#if>
                                    </select>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>地址：</th><td><input class="form-control" name="contactAddr" type="text" value="${user.contactAddr!}" /></td>
                    </tr>
                    <tr>
                        <th>邮编：</th><td><input class="form-control" name="zip" type="text" value="${user.zip!}" empty pattern="zip"  /></td>
                    </tr>
                    <tr>
                        <th>QQ：</th><td><input class="form-control" name="qq" type="text" value="${user.qq!}" empty pattern="qq"  /></td>
                    </tr>
                    <tr>
                        <th>状态：</th>
                        <td>
                            <select name="status" class="form-control">
                                <option value="1"<#if user.status==1> selected = "selected"</#if>>正常</option>
                                <option value="2"<#if user.status==2> selected = "selected"</#if>>删除</option>
                                <option value="3"<#if user.status==3> selected = "selected"</#if>>锁定</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td></td><td><button class='btn btn-primary' type="submit">确 定</button></td>
                    </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
    <!--右侧内容 结束-->
</div>
<script type="text/javascript">seajs.use('user', function(user) {});</script>
</body>
</html>